﻿using Microsoft.Extensions.DependencyInjection;
using PineLake.Drmwe.ConvertValue.ConvertEnumValue;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PineLake.Drmwe.Core.ConvertEnum
{
    /// <summary>
    /// 枚举类转换成LIST
    /// </summary>
    public static class ConvertEnumStartup
    {
        /// <summary>
        /// 枚举类 转换成LIST
        /// </summary>
        /// <param name="Services"></param>
        /// <exception cref="ArgumentNullException"></exception>
        public static void AddConvertEnumStartup(this IServiceCollection Services)
        {
            if (Services == null) throw new ArgumentNullException(nameof(Services));
            Services.AddTransient<IConvertsEnum, ConvertsEnum>();
        }
    }
}
